package cease.console;

import java.io.IOException;
import java.util.Properties;

import cease.util.ParseUtil;

/**
 * @author dhf
 */
public class Config {
    private static Properties config = new Properties();
    static {
        try {
            config.load(ClassLoader
                    .getSystemResourceAsStream("conf/console.properties"));
        } catch (IOException e) {
            throw new IllegalStateException(e);
        }
    }

    public static boolean echoPassword = "on".equals(config
            .getProperty("password.echo"));

    public static boolean saveSession = "on".equals(config
            .getProperty("session.save"));

    public static int sessionTimeout = ParseUtil.parseInt(
            config.getProperty("session.timeout"), 1800);

    public static String sessionFile = config.getProperty("session.file",
            "session");

    public static String KEY_MESSAGE_SHOW = config
            .getProperty("key.message.show");

    public static String KEY_MESSAGE_CREATE = config
            .getProperty("key.message.create");

    public static String KEY_MESSAGE_DELETE = config
            .getProperty("key.message.delete");

    public static String KEY_TIMELINE_SEARCH = config
            .getProperty("key.timeline.search");

    public static String KEY_TIMELINE_HOME = config
            .getProperty("key.timeline.home");

    public static String KEY_TIMELINE_PUBLIC = config
            .getProperty("key.timeline.public");

    public static String KEY_TIMELINE_USER = config
            .getProperty("key.timeline.user");

    public static String KEY_TIMELINE_MENTION = config
            .getProperty("key.timeline.mention");

    public static String KEY_TIMELINE_RETWEET = config
            .getProperty("key.timeline.retweet");

    public static String KEY_FAVORITE_SHOW = config
            .getProperty("key.favorite.show");

    public static String KEY_BUTTER_SHOW = config
            .getProperty("key.butter.show");

    public static String KEY_BUTTER_POST = config
            .getProperty("key.butter.post");

    public static String KEY_BUTTER_RETWEET = config
            .getProperty("key.butter.retweet");

    public static String KEY_BUTTER_DELETE = config
            .getProperty("key.butter.delete");

    public static String KEY_BUTTER_MUTE = config
            .getProperty("key.butter.mute");

    public static String KEY_BUTTER_UNMUTE = config
            .getProperty("key.butter.unmute");

    public static String KEY_BLOCK_ADD = config.getProperty("key.block.add");

    public static String KEY_BLOCK_DELETE = config
            .getProperty("key.block.delete");

    public static String KEY_BLOCK_CHECK = config
            .getProperty("key.block.check");

    public static String KEY_FRIENDSHIP_FOLLOW = config
            .getProperty("key.friendship.follow");

    public static String KEY_FRIENDSHIP_UNFOLLOW = config
            .getProperty("key.friendship.unfollow");

    public static String KEY_CEASE_VERSION = config
            .getProperty("key.cease.version");

    public static String KEY_CEASE_DOWNLOAD = config
            .getProperty("key.cease.download");

    public static String KEY_FAVORITE_ADD = config
            .getProperty("key.favorite.add");

    public static String KEY_FAVORITE_DELETE = config
            .getProperty("key.favorite.delete");

    public static String KEY_UNREADS_COUNT = config
            .getProperty("key.unreads.count");

    public static String KEY_PHOTO_UPLOAD = config
            .getProperty("key.photo.upload");

    public static String KEY_QUIT = config.getProperty("key.quit");

    public static String KEY_LOGOUT = config.getProperty("key.logout");

    public static String KEY_HELP = config.getProperty("key.help");

}
